import request from '@/common/request/request.js'
import config from '@/common/config/config.js';
const http = config.env

// 查询登陆人服务中心额度
export const getAllFunds = () => {
  return request({
		url: http.baseUrl + '/customerRecharge/findAllocateFunds',
    method: 'get'
  })
}

// 查询审核列表
export const getCentreList = data => {
  return request({
		url: http.baseUrl + '/customerRecharge/centreListPage',
    method: 'get',
		data
  })
}

// 查询登录人服务中心信息
export const getFindCenterInfo = () => {
  return request({
		url: http.baseUrl + '/serviceCenter/findCenter',
    method: 'get'
  })
}

// 审核通过
export const passApprovance = data => {
  return request({
		url: http.baseUrl + '/customerRecharge/centreApprovance',
    method: 'post',
		data
  })
}

// 审核拒绝
export const refuseApprovance = data => {
  return request({
		url: http.baseUrl + '/customerRecharge/refuseAudit',
    method: 'post',
		data
  })
}

// 查询服务站长提交的申请列表
export const getApplyList = data => {
  return request({
		url: http.baseUrl + '/customerRecharge/listPage',
    method: 'get',
		data
  })
}

// 根据服务中心id查询服务中心信息
export const getCenterInfoById = id => {
  return request({
		url: http.baseUrl + `/serviceCenter/center/${id}`,
    method: 'get'
  })
}

// 额度明细收入列表
export const getIncomeList = id => {
  return request({
		url: http.baseUrl + `/serviceCenter/findCenterIncome`,
    method: 'get'
  })
}

// 修改服务中心信息
export const editeInfo = data => {
  return request({
		url: http.baseUrl + `/serviceCenter/updateCenter`,
    method: 'put',
    data
  })
}


// 加速积分
export const advancePoint = data => {
  return request({
		url: http.baseUrl + `/order/acceleratedList`,
    method: 'get',
    data
  })
}

// 获取服务中心列表
export const serviceCenterList = data => {
  return request({
		url: http.baseUrl + `/serviceCenter/findCenterList`,
    method: 'get',
    data
  })
}

// 获取消费明细列表
export const getExpendList = data => {
  return request({
		url: http.baseUrl + `/customerRecharge/centreListPage`,
    method: 'get',
    data
  })
}
